package models

type UserToken struct {
	Username string `json:"username"`
	Pwd string `json:"pwd"`
}

type User struct {
	Username string `json:"username"`
	UserID string `json:"user_id"`
	Pwd string `json:"pwd"`
	AuthLevel int `json:"auth_level"`
	SystemLevel int `json:"system_level"`
	AdminLevel int `json:"admin_level"`
}

func NewUser(un string, pwd string, authlvl int, systemlvl int, adminlvl int) *User {
	var newUser= new(User)
	newUser.Username = un
	newUser.Pwd = pwd
	newUser.AuthLevel = authlvl
	newUser.SystemLevel = systemlvl
	newUser.AdminLevel = adminlvl
	return newUser
}

type UserInfo struct {
	ID string `json:"id"`
	UID string `json:"uid"`
	Company string `json:"company"`
	Department string `json:"department"`
	Group string `json:"group"`
	Hobbies []string `json:"hobbies"`
	Skills []string `json:"skills"`
	Avatar string `json:"avatar"`
	Labels string `json:"labels"`
	Address string `json:"address"`
	Phone string `json:"phone"`
}

type HumanSourceInfo struct {
	ID string `json:"id"`
	UID string `json:"uid"`
	Sex string `json:"sex"`
	TechnicalSeries bool `json:"technical_series"`
	ManagementSeries bool `json:"management_series"`
	BirthDate string `json:"born_date"`
	EmployedDate string `json:"employed_date"`
	GraduateDate string `json:"graduate_date"`
	GraduateSchool string `json:"graduate_school"`
}

type UserCategories struct {
	ID string `json:"id"`
	Roll string `json:"roll"`
	RollID string `json:"roll_id"`
}

